package oop.day01;

// 创建了一个car类
public class Car {// 自己定义的一个数据类型
    // 属性  成员变量  描述类的特征
    String color;
    String brand;
    double price;
    int    capacity;

   Car(){
       System.out.println("car的无参构造方法执行");
    }
    Car(String color, String brand){
       this.color = color;
       this.brand = brand;
    }

    Car(String color, String brand, double price, int capacity){
       this.color = color;
       this.brand = brand;
       this.price = price;
       this.capacity = capacity;

    }

    // 方法 行为  描述类的行为
    public void start(){
        System.out.println(this.brand+"牌"+this.color+this.price+"万，承载"+this.capacity+"人的汽车启动了~~~~");
    }

    public void run(){
        System.out.println(brand+"牌"+color+price+"万，承载"+capacity+"人汽车跑起来了~~~~");
    }

    public void stop(){
        System.out.println(brand+"牌"+color+price+"万，承载"+capacity+"人汽车停止了~~~~");
    }


}
